class Solution {
public:
    bool isPalind(string str)
{
	int i = 0;
	int j = str.size() - 1;
	while (i < j)
	{
		if (str[i] != str[j])
			return false;
		++i;
		--j;
	}
    return true;
}
string firstPalindrome(vector<string>& words) 
{
	for (const auto &it : words)
	{
		if (isPalind(it))
			return it;
	}

	return "";
}
};
